package com.cyc.service.impl;

import com.cyc.dao.OrderMapper;
import com.cyc.entity.Order;
import com.cyc.service.OrderService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class OrderServiceImpl implements OrderService {
    @Autowired
    OrderMapper orderMapper;

    @Override
    public List<Order> selectByUserId(Integer id) {
        return orderMapper.selectByUserId(id);
    }

    @Override
    public int deleteByUserId(Integer id) {
        return orderMapper.deleteByUserId(id);
    }

    @Override
    public int insert(Order record) {
        return orderMapper.insert(record);
    }

    @Override
    public Order selectByPrimaryKey(Integer id) {
        return orderMapper.selectByPrimaryKey(id);
    }
}
